home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Whiteline: delta
/
whiteline CD Series - delta.iso
/
progtool
/
modula2
/
m2d2
/
rcsmaker
/
rsc2mod.msk
next >
Wrap
Text File
|
1995-11-25
|
3KB
|
118 lines
IMPLEMENTATION MODULE @
(*$S-,$T-,$Q+*)
FROM SYSTEM IMPORT ADDRESS, CODE;
FROM GEMAES IMPORT ResourceObjectFix;
IMPORT GEMAESbase;
CONST (* idx's & nr's *)@
nrTrees = @; idxTree = @;@
nrObjects = @; idxObject = @;@
nrTEdInfos = @; idxTEdInfo = @;@
nrIconBlks = @; idxIconBlk = @;@
nrBitBlks = @; idxBitBlk = @;@
nrFreeStrings = @; idxFreeString = @;@
nrFreeImages = @; idxFreeImage = @;@
(*$P-*)
PROCEDURE RSCdata@;
BEGIN
@ CODE ( @, @ );
@ END RSCdata@;@
PROCEDURE RelocateRSC;
VAR i : INTEGER;
x : ADDRESS;
@
Trees : POINTER TO ARRAY [ 0..nrTrees-1 ] OF ADDRESS;@
Objects : POINTER TO ARRAY [ 0..nrObjects-1 ] OF GEMAESbase.Object;@
TEdInfos: POINTER TO ARRAY [ 0..nrTEdInfos-1 ] OF GEMAESbase.TEdInfo;@
Icons : POINTER TO ARRAY [ 0..nrIconBlks-1 ] OF GEMAESbase.IconBlk;@
BitBlks : POINTER TO ARRAY [ 0..nrBitBlks-1 ] OF GEMAESbase.BitBlk;@
FreeStr : POINTER TO ARRAY [ 0..nrFreeStrings-1 ] OF ADDRESS;@
FreeImg : POINTER TO ARRAY [ 0..nrFreeImages-1 ] OF ADDRESS;@
BEGIN
WITH GEMAESbase.AESGlobal DO@
apPMem := ADDRESS ( RSCdata0 );
apPTree := ADDRESS ( RSCdata0 ) + idxTree;
Trees := apPTree@
END;
@
x := ADDRESS ( RSCdata@ );@
FOR i := 0 TO nrTrees-1 DO
(*$T-*)
INC ( Trees^[ i ], LONGCARD ( RSCdata0 ) )
(*$T=*)
END;
@
Objects := ADDRESS ( RSCdata0 ) + idxObject;
FOR i := 0 TO nrObjects-1 DO
WITH Objects^[ i ] DO
IF ( obType # GEMAESbase.GBOX ) AND
( obType # GEMAESbase.GBOXCHAR ) AND
( obType # GEMAESbase.GIBOX )
THEN (*$T-*)
INC ( obSpec, LONGCARD ( RSCdata0 ) )
(*$T=*)
END;
ResourceObjectFix ( Objects, i )
END
END;
@
TEdInfos := ADDRESS ( RSCdata0 ) + idxTEdInfo;
FOR i := 0 TO nrTEdInfos-1 DO
WITH TEdInfos^[ i ] DO
(*$T-*)
INC ( tePText, LONGCARD ( RSCdata0 ) );
INC ( tePTmplt, LONGCARD ( RSCdata0 ) );
INC ( tePValid, LONGCARD ( RSCdata0 ) )
(*$T=*)
END
END;
@
Icons := ADDRESS ( RSCdata0 ) + idxIconBlk;
FOR i := 0 TO nrIconBlks-1 DO
WITH Icons^[ i ] DO
(*$T-*)
INC ( ibPMask, LONGCARD ( RSCdata0 ) );
INC ( ibPData, LONGCARD ( RSCdata0 ) );
INC ( ibPText, LONGCARD ( RSCdata0 ) )
(*$T=*)
END
END;
@
BitBlks := ADDRESS ( RSCdata0 ) + idxBitBlk;
FOR i := 0 TO nrBitBlks-1 DO
(*$T-*)
INC ( BitBlks^[ i ].biPData, LONGCARD ( RSCdata0 ) )
(*$T=*)
END;
@
FreeStr := ADDRESS ( RSCdata0 ) + idxFreeString;
FOR i := 0 TO nrFreeStrings-1 DO
(*$T-*)
INC ( FreeStr^[ i ], LONGCARD ( RSCdata0 ) )
(*$T=*)
END;
@
FreeImg := ADDRESS ( RSCdata0 ) + idxFreeImage;
FOR i := 0 TO nrFreeImages-1 DO
(*$T-*)
INC ( FreeImg^[ i ], LONGCARD ( RSCdata0 ) )
(*$T=*)
END
@
END RelocateRSC;
END @.@